
local time = achievements.GetValue( "I Don't Like Walking", "total", 0 )

local target = 36000
local function Update()
	local ply = LocalPlayer()
	if ( !ValidEntity( ply ) ) then return end
	
	if ( time != target && ply:GetMoveType() == MOVETYPE_NOCLIP && !ply:InVehicle() ) then
		time = math.Clamp( time + 1, 0, target )
		achievements.SetValue( "I Don't Like Walking", "total", time )
		
		if ( time >= target ) then
			timer.Destroy( "Achievements.IDontLikeWalking" )
		end
	end
	
	achievements.Update( "I Don't Like Walking", time / target, achievements.FormatTime( time, "h:m:s" ) )
end
timer.Create( "Achievements.IDontLikeWalking", 1, 0, Update )

achievements.Register( "I Don't Like Walking", "Spend a total of 10 hours in noclip.", "achievements/dontlike", time / target, achievements.FormatTime( time, "h:m:s" ) )